import axios from 'axios'

const _axios=axios.create({timeout:100000});
_axios.interceptors.request.use(
    function(config){
       config.headers.Authorization="Bearer sk-62025a56073b406f8c1589bf24cc168d";
       if(config.method=='post')
          config.headers['Content-Type'] = "application/json";
       return config;
    }
);

_axios.interceptors.response.use(
    (response)=>{return response}
    ,(error)=>{
        console.log(error);
        alert(error)
    }
)

export default _axios;